#include <glib.h>

gint main(gint argc, gchar **argv)
{
    GString *string;
    
    string = g_string_new ("firsthalf");
    
    g_print("original string: %s \n", string->str);

    g_string_append_len (string, "lasthalfjunkjunk", strlen ("lasthalf"));
    
    g_print("after append: %s \n", string->str);  // value is firsthalflasthalf

    g_string_free (string, TRUE);

    return 0;
}